package com.hoyue.classroom.bean;

import com.hoyue.system.bean.User;

import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * @author 空白
 * @version 1.0
 * Create by 2019/08/31 10:36
 */
public class Group {
    // 序号
    private Integer id;

    // 课程id
    private Integer courseId;

    // 小组名称
    private String name;

    // 创建人id
    private Integer userId;

    // 创建时间
    private Date createTime;

    // 更新时间
    private Date updateTime;

    // 小组成员
    @Transient
    private List<User> students;

    // 小组成员人数
    @Transient
    private Integer number;

    public Group() {
    }

    public Group(Integer courseId, String name, Integer userId, Date createTime, Date updateTime) {
        this.courseId = courseId;
        this.name = name;
        this.userId = userId;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public List<User> getStudents() {
        return students;
    }

    public void setStudents(List<User> students) {
        this.students = students;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    @Override
    public String toString() {
        return "Group{" +
                "id=" + id +
                ", courseId=" + courseId +
                ", name='" + name + '\'' +
                ", userId=" + userId +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", students=" + students +
                ", number=" + number +
                '}';
    }
}
